import request from "@/router/axios";
import { baseUrl } from "@/config/env";

//查询设备
export const gettaskslist = (data) =>
  request({
    url: baseUrl + "/api/tasks",
    method: "get",
    params: data,
  });
// 机种序列
export const grtAircraft = (data) =>
  request({
    url: baseUrl + "/api/aircraft/all",
    method: "get",
    params: data,
  });
// 新增工单在
export const addtasks = (list) =>
  request({
    url: baseUrl + "/api/tasks",
    method: "post",
    data: list,
  });
// 修改用户
export const eidTasks = (list) =>
  request({
    url: baseUrl + "/api/tasks",
    method: "put",
    data: list,
  });
// 修改用户
export const eidStatus = (list) =>
  request({
    url: baseUrl + "/api/tasks/status",
    method: "put",
    data: list,
  });
// 删除用户
export const dleTasks = (list) =>
  request({
    url: baseUrl + "/api/tasks",
    method: "delete",
    data: list,
  });
// 查询角色
export const rolesAll = () =>
  request({
    url: baseUrl + "/api/roles/all",
    method: "get",
  });
